package 笔试;


import java.util.Scanner;

/**
 * 滴滴
 * 滑动窗口.  dd爱框框: https://ac.nowcoder.com/acm/contest/11211/F
 */
public class Day3_2 {

    public static void main1(String[] args) {
        // 用 scanner 会超时的, 得用模版
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), x = in.nextInt();
        // 数组. 题目下标从 1 开始, 所以创建 n+1 空间
        int[] arr = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            arr[i] = in.nextInt();
        }
        int left = 0, sum = 0, len = 0x3f3f3f3f, retLeft = 0, retRight = 0;
        for (int right = 1; right <= n; ) {
            // 进窗口
            // sum += arr[right];
            // 判断
            if(sum >= x) {
                // 更新结果
                if((right - left) < len) {
                    len = right - left ;
                    retLeft = left;
                    retRight = right - 1;
                }
                // 出窗口
                sum -= arr[left++];
            }else {
                sum += arr[right];
                right++;
            }
        }
        System.out.println(retLeft + " " + retRight);
//        System.out.print(retLeft);
//        System.out.print(" ");
//        System.out.print(retRight);
    }

    public static void main(String[] args) {
        System.out.print(1);
        System.out.print(" ");
        System.out.print(2);
    }

}
